{include file="admin/modules/shop_cart/tabs.html"}
{ext->class_function class="shop_cart" func="get_order_data" assign="elements" order_id=$smarty.get.order_id}
<table width="100%" cellpadding="0" cellspacing="0" style="border:1px solid #C4CDD2; border-top:0px; background:#DBE1E5; padding:0px 5px 5px 5px">
	<tr>
		<td>
		
		<table width="100%" cellpadding="0" cellspacing="0">
			<tr>
				<td height="10"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>		
			</tr>
			<tr>
				<td height="1" bgcolor="#ADB9BF"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
			</tr>
			<tr>
				<td height="1" bgcolor="#E4E9EC"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
			</tr>
			<tr>
				<td height="10"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>		
			</tr>
		</table>		
		<table width="100%" cellpadding="0" cellspacing="0">
			<tr>
				<td height="1" bgcolor="#C4CDD2"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>		
			</tr>			
		</table>
		<table width="100%" cellpadding="0" cellspacing="0" style="border:1px solid #C4CDD2; border-top:0px;">
			<tr>
				<td width="1" bgcolor="#DBE1E5"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
				<td style="border:5px solid white; border-bottom:0px">
					<table width="100%" cellpadding="0" cellspacing="0">
					<tr>
						<td style="border:1px solid #8CA2B1">
							<table width="100%" cellpadding="0" cellspacing="0">
								<tr>
									<td bgcolor="#EDF0F2" style="padding:10px; line-height:150% ">
									<table width="100%" cellpadding="0" cellspacing="0">
										<tr>
											<td>												
												{t t='Užsakymo ID'} - <strong>{$elements.main.date|date_format:"%Y%m%d"}{$elements.main.order_id}</strong>
											</td>
											<td align="right">
												<form name="order_status" action="index.php" enctype="multipart/form-data" method="post">
													<input name="admin" type="hidden" value="1">
													<input name="module" type="hidden" value="shop_cart">
													<input name="mod" type="hidden" value="order">
													<input name="act" type="hidden" value="change_status">
													<input name="parent" type="hidden" value="{$smarty.get.order_id}">
													<input name="referer" type="hidden" value="{ext->get_referer}">
													<table cellpadding="0" cellspacing="0">
													<tr>
														<td>
														<select name="status" size="1">
															<option value="0" {if !$elements.main.status || ($elements.main.status == 0)}selected{/if}>0 %</option>
															<option value="10" {if $elements.main.status == 10}selected{/if}>10 %</option>
															<option value="20" {if $elements.main.status == 20}selected{/if}>20 %</option>
															<option value="30" {if $elements.main.status == 30}selected{/if}>30 %</option>
															<option value="40" {if $elements.main.status == 40}selected{/if}>40 %</option>
															<option value="50" {if $elements.main.status == 50}selected{/if}>50 %</option>
															<option value="60" {if $elements.main.status == 60}selected{/if}>60 %</option>
															<option value="70" {if $elements.main.status == 70}selected{/if}>70 %</option>
															<option value="80" {if $elements.main.status == 80}selected{/if}>80 %</option>
															<option value="90" {if $elements.main.status == 90}selected{/if}>90 %</option>
															<option value="100" {if $elements.main.status == 100}selected{/if}>100 %</option>
														</select>
														</td>
														<td width="20">&nbsp;</td>
														<td valign="middle">
															<a href="#" onClick="order_status.submit()">{t t="Išsaugoti būseną"}</a>
														</td>
													</tr>
													</table>
												</form>
											</td>
										</tr>
									</table>
									<!-- 
									<br><br>
									{*debug var=$elements*}
									{include file="admin/body/shop_cart/selector.html"}
									 -->
									</td>		
								</tr>
							</table>
							{if $elements.client_info}
							<!-- * kliento duomenys -->
							<table width="100%" cellpadding="0" cellspacing="0" style="border-top:1px solid #8CA2B1 ">
								<tr>
									<td style="padding:10px " bgcolor="#DBE1E5"><strong>{t t="Psisijungusio kliento duomenys"}</strong></td>		
								</tr>
							</table>
							<table width="100%" cellpadding="0" cellspacing="0" style="border-top:1px solid #8CA2B1 ">
								<tr>
									<td bgcolor="#ffffff">
									<table width="100%" cellpadding="0" cellspacing="0" style="margin:5px 0px 5px 0px ">
									{foreach from=$elements.client_info item="el"}										
											{if $el.name!='id_pass'}											
											<tr>
												<td width="210" height="16" style="padding:0px 0px 0px 20px ">
												{if $el.name=='client_id' || $el.name=='id_login' || $el.name=='email'}{t t=$el.name}{else}{$el.name}{/if}</td>	
												<td>{$el.value|strip_tags|truncate:200}</td>	
											</tr>		
											{/if}									
									{/foreach}
									</table>
									</td>		
								</tr>
							</table>
							<!-- /* kliento duomenys -->
							{/if}
							<!-- * Uzsakymo duomenys -->
							<table width="100%" cellpadding="0" cellspacing="0" style="border-top:1px solid #8CA2B1 ">
								<tr>
									<td style="padding:10px " bgcolor="#DBE1E5"><strong>{t t="Užsakymo duomenys"}</strong></td>		
								</tr>
							</table>
							<table width="100%" cellpadding="0" cellspacing="0" style="border-top:1px solid #8CA2B1 ">
								<tr>
									<td bgcolor="#ffffff">
									<table width="100%" cellpadding="0" cellspacing="0" style="margin:5px 0px 5px 0px ">
									{foreach from=$elements.data item="el"}
											<tr>
												<td width="210" height="16" style="padding:0px 0px 0px 20px ">
												{if $el.name=='client_id' || $el.name=='id_login' || $el.name=='email'}{t t=$el.name}{else}{$el.name}{/if}</td>	
												</td>	
												<td>{$el.value|strip_tags|truncate:200}</td>	
											</tr>											
									{/foreach}
									</table>
									</td>		
								</tr>
							</table>
							<!-- /* uzsakymo duomenys -->

							<!-- * Nuolaidu duomenys -->
							{if $elements.off_global.id || $elements.off_select.id || $elements.off_client.id}
							<table width="100%" cellpadding="0" cellspacing="0" style="border-top:1px solid #8CA2B1 ">
								<tr>
									<td style="padding:10px " bgcolor="#DBE1E5"><strong>{t t="Nuolaidų duomenys"}</strong></td>		
								</tr>
							</table>
							{/if}
							{if $elements.off_global.id}
							<!-- * xoxoxo -->
							<table width="100%" cellpadding="0" cellspacing="0" style="border-top:1px solid #8CA2B1; ">
								<tr style="background-color:#EDF0F2 ">
									<td height="20">
									<table cellpadding="0" cellspacing="0">
										<tr>
											<td style="padding:0px 0px 0px 20px " width="200"><strong>{t t='Privaloma nuolaida'}</strong></td>
											<td height="16"  style=" padding:0px 0px 0px 10px; width:100px ">{t t='Dydis'}: {$elements.off_global.num}%</td>	
											<td style=" padding:0px 0px 0px 10px; width:150px ">{t t='Pavadinimas'}: {$elements.off_global.name}</td>	
											<td style=" padding:0px 0px 0px 10px ">{t t='Aprašymas'}: {$elements.off_global.desc}</td>										
										</tr>
									</table>
									</td>
								</tr>																													
							</table>							
							<!-- /* xoxoxo -->
							{/if}							
							{if $elements.off_select.id}
							<!-- * xoxoxo -->
							<table width="100%" cellpadding="0" cellspacing="0" style="border-top:1px solid #8CA2B1; ">
								<tr style="background-color:#EDF0F2 ">
									<td height="20">
									<table cellpadding="0" cellspacing="0">
										<tr>
											<td style="padding:0px 0px 0px 20px " width="200"><strong>{t t='Pasirenkama nuolaida'}</strong></td>
											<td height="16"  style=" padding:0px 0px 0px 10px; width:100px ">{t t='Dydis'}: {$elements.off_select.num}%</td>	
											<td style=" padding:0px 0px 0px 10px; width:150px ">{t t='Pavadinimas'}: {$elements.off_select.name}</td>	
											<td style=" padding:0px 0px 0px 10px ">{t t='Aprašymas'}: {$elements.off_select.desc}</td>										
										</tr>
									</table>
									</td>
								</tr>																													
							</table>							
							<!-- /* xoxoxo -->
							{/if}							
							{if $elements.off_client.id}
							<!-- * xoxoxo -->
							<table width="100%" cellpadding="0" cellspacing="0" style="border-top:1px solid #8CA2B1; ">
								<tr style="background-color:#EDF0F2 ">
									<td height="20">
									<table cellpadding="0" cellspacing="0">
										<tr>
											<td style="padding:0px 0px 0px 20px " width="200"><strong>{t t='Kliento nuolaida'}</strong></td>
											<td height="16"  style=" padding:0px 0px 0px 10px; width:100px ">{t t='Dydis'}: {$elements.off_client.num}%</td>	
											<td style=" padding:0px 0px 0px 10px; width:150px ">{t t='Pavadinimas'}: {$elements.off_client.name}</td>	
											<td style=" padding:0px 0px 0px 10px ">{t t='Aprašymas'}: {$elements.off_client.desc}</td>										
										</tr>
									</table>
									</td>
								</tr>																													
							</table>							
							<!-- /* xoxoxo -->
							{/if}							
							<!-- * prekes -->
							<table width="100%" cellpadding="0" cellspacing="0" style="border-top:1px solid #8CA2B1 ">
								<tr>
									<td style="padding:10px " bgcolor="#DBE1E5"><strong>{t t="Prekių duomenys"}</strong></td>		
								</tr>
							</table>							
							<table width="100%" cellpadding="0" cellspacing="0" style="border-top:1px solid #8CA2B1 ">
								<tr>
									<td style="padding:0px 0px 0px 0px; " bgcolor="#FFFFFF">
									{counter start=0 skip=1 assign="ct"}
									{foreach from=$elements.products item="el"}
									{*debug var=$el*}
									{math equation="x+y" x=$el.data.price.total_all y=$super_total_counted_price|default:0 assign="super_total_counted_price"}	
										<table width="100%" cellpadding="0" cellspacing="0" style="{if $ct!=0}border-top:1px solid #8CA2B1{/if}; cursor:pointer " onClick="shopingCart.toggleItemDescription({$el.id})">
											<tr style="background-color:#EDF0F2 ">
												<td height="20">
												<table width="100%" cellpadding="0" cellspacing="0">
													<tr>
														<td style="padding:0px 0px 0px 20px" width="200" height="16"><strong>{$el.name}</strong></td>
														<td style="padding:0px 0px 0px 10px" width="100">{t t='Kiekis'}: {$el.count}</td>
														<td style="padding:0px 0px 0px 10px" width="150">{t t='Vieneto kaina'}: {$el.data.price.price|default:0} {$_var.curency.default}</td>
														<td style="padding:0px 0px 0px 10px" width="150">{t t='Bendra kaina'}: {$el.data.price.price_all|default:0} {$_var.curency.default}</td>
														<td style="padding:0px 0px 0px 10px" width="100">{t t='Nuolaida'}: {$el.data.price.discount|default:0}%</td>
														<td style="padding:0px 0px 0px 10px">{t t='Bendra kaina su nuolaida'}: {$el.data.price.total_all|default:0} {$_var.curency.default}</td>
													</tr>
												</table>
												</td>
											</tr>																													
										</table>
										<table width="100%" cellpadding="0" cellspacing="0" style="visibility:hidden; position:absolute; top:-500px " id="inormation_{$el.id}">
											<tr>
												<td colspan="2" bgcolor="#8CA2B1"><img src="client/img/spacer.gif" width="1" height="1" border="0" alt="" /></td>
											</tr>
											<tr>
												<td height="10" bgcolor="#ffffff" colspan="2"><img src="client/img/spacer.gif" width="1" height="1" border="0" alt="" /></td>
											</tr>	
										{foreach from=$el.data item="el2" key="key2"}
											{if $key2!='main_group' && $key2!='data' && $el2.type!='image' && $key2!='price' && $key2!='off' && $el2.type!='custom_info' && $el2.type!='spacer' && $el2.type!='shop_subproduct_container' && $el2.type!='super_select'}
											<tr>
												<td width="210" height="16" style="padding:0px 0px 0px 20px ">{t t=$key2}</td>	
												<td>{$el2.value|strip_tags|truncate:200}</td>	
											</tr>
											{elseif $el2.type=='super_select'}
											{ext->class_function class="shop" func="get_super_select" name=$key2 parent=$el.product_id assign="super_data"}
											<tr>
												<td width="210" height="16" style="padding:0px 0px 0px 20px ">{t t=$key2}</td>	
												<td>{$super_data.selected.text}</td>	
											</tr>
											{elseif $el2.type=='spacer'}
											<tr>
												<td width="210" height="16" style="padding:0px 0px 0px 20px ">&nbsp;</td>	
												<td>&nbsp;</td>	
											</tr>
											{elseif $el2.type=='custom_info'}
												{capture name="custom_info"}
													{$smarty.capture.custom_info}
													<tr>
														<td style="padding:0px 0px 0px 20px; height:16px ">{t t=$key2}</td>
														<td>{$el2.value}</td>
													</tr>									
												{/capture}																													
											{/if}
										{/foreach}
											{if $smarty.capture.custom_info}
												<tr>
													<td height="10"><img src="client/img/spacer.gif" width="1" height="1" border="0" alt="" /></td>
												</tr>
												<tr>
													<td colspan="2" bgcolor="#dbe1e5"><img src="client/img/spacer.gif" width="1" height="1" border="0" alt="" /></td>
												</tr>
												<tr>
													<td height="10"><img src="client/img/spacer.gif" width="1" height="1" border="0" alt="" /></td>
												</tr>		
												<tr>
													<td height="10" style="padding:0px 0px 0px 20px; height:16px; font-weight:bold;">{t t='Papildomai'}</td>
													<td><img src="client/img/spacer.gif" width="1" height="1" border="0" alt="" /></td>
												</tr>		
												<tr>
													<td height="10"><img src="client/img/spacer.gif" width="1" height="1" border="0" alt="" /></td>
												</tr>		
												{$smarty.capture.custom_info}
												{capture name="custom_info"}{/capture}
											{/if}
											<tr>
												<td height="10"><img src="client/img/spacer.gif" width="1" height="1" border="0" alt="" /></td>
											</tr>
											<tr>
												<td colspan="2" bgcolor="#dbe1e5"><img src="client/img/spacer.gif" width="1" height="1" border="0" alt="" /></td>
											</tr>
											<tr>
												<td height="10"><img src="client/img/spacer.gif" width="1" height="1" border="0" alt="" /></td>
											</tr>		
											<tr>
												<td style="padding:0px 0px 0px 20px; height:16px ">{t t='Kiekis'}</td>
												<td><strong>{$el.count}</strong> {t t='vnt.'}</td>
											</tr>									
											<tr>
												<td style="padding:0px 0px 0px 20px; height:16px ">{t t='Vieneto kaina be nuolaidos'}</td>
												<td><strong>{$el.data.price.price}</strong> {$_var.curency.default}</td>
											</tr>
											<tr>
												<td style="padding:0px 0px 0px 20px; height:16px ">{t t='Bendra kaina be nuolaidos'}</td>
												<td><strong>{$el.data.price.price_all}</strong> {$_var.curency.default}</td>
											</tr>
											{if $el.data.price.discount}
											<tr>
												<td style="padding:0px 0px 0px 20px; height:16px ">{t t='Vieneto kaina su nuolaida'}</td>
												<td><strong>{$el.data.price.total}</strong> {$_var.curency.default}</td>
											</tr>
											<tr>
												<td style="padding:0px 0px 0px 20px; height:16px ">{t t='Bendra kaina su nuolaida'}</td>
												<td><strong>{$el.data.price.total_all}</strong>	{$_var.curency.default}</td>
											</tr>											
											<tr>
												<td style="padding:0px 0px 0px 20px; height:16px ">{t t='Taikoma nuolaida'}</td>
												<td>
													<strong>{$el.data.price.discount}</strong>% {$el.data.off.name} ({$el.data.off.desc})
												</td>
											</tr>
											{/if}																						
											<tr>
												<td height="10" bgcolor="#ffffff" colspan="2"><img src="client/img/spacer.gif" width="1" height="1" border="0" alt="" /></td>
											</tr>		
										</table>			
										{counter skip=1 assign="ct"}								
									{/foreach}
									</td>		
								</tr>
							</table>
							<table width="100%" cellpadding="0" cellspacing="0" style="border-top:1px solid #8CA2B1 ">
								<tr>
									<td style="padding:10px " bgcolor="#DBE1E5">{t t="Viso užsakymo suma su nuolaida"}: <strong>{$super_total_counted_price}</strong> {$_var.curency.default}</td>		
								</tr>
							</table>							
							<!-- /* prekes -->
						</td>		
					</tr>
					</table>
				<table width="100%" cellpadding="0" cellspacing="0">
					<tr>
						<td bgcolor="#FFFFFF" height="5">						
						</td>		
					</tr>
				</table>
				</td>	
				<td width="1" bgcolor="#DBE1E5"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
			</tr>
		</table>
		</td>		
	</tr>	
</table>

{if !$first}
<table width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td height="1" bgcolor="#DBE1E5"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>
	</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
	<tr>
		<td height="20"><img src="client/img/spacer.gif" class="spacer" alt="" /></td>		
	</tr>
</table>
{/if}